<!--导航栏-->
<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                                                                                    rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/hllopen">开放平台</a>
                </li>
                <li>
                    <a href="#/hllopen/rbac/api_list">应用权限API</a>
                </li>
                <li class="active">API接口</li>
            </ul>
        </div>
    </div>
</div>

<div class="container-fluid">
    <!--条件输入菜单-->
    <div style="margin: 10px">
        <div style="border:1px solid #f0f0f0;">
            <div class="col-sm-4 col-md-4 " style="margin: 10px;  float: left">
                <table style="border-collapse:separate; border-spacing:10px;">
                    <tr>
                        <td style="border-bottom:0">
                            接口描述：{{vm.p.api.desc}}， 负责人：{{vm.p.api.owner}}， 更新时间：{{vm.p.api.actionTime}}
                        </td>
                    </tr>
                    <tr>
                        <td style="border-bottom:0">
                            接口名称：
                            <select ng-model="vm.p.api" style="width: 300px" ng-options="x.name for x in vm.p.apis" style="width:100%"></select>
                        </td>
                    </tr>
                    <tr ng-repeat="item in vm.p.api.params">
                        <td style="border-bottom:0">
                            {{item.name}}：
                            <!-- 动态model -->
                            <textarea type="text" ng-model="$parent.conf[$index]" value="{{item.value}}" style="width: 300px;height: 60px"/>
                        </td>
                    </tr>

                    <tr>
                        <td style="border-bottom:0">
                            实例：
                            <select ng-model="vm.p.apiKey" style="width: 300px"
                                    ng-options="x for x in vm.p.apiParamsKey" ng-init="vm.p.apiKey = vm.p.apiParamsKey[0]"
                                    style="width:100%">
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td style="border-bottom:0">
                            <button ng-click="setApiParams()">保存参数</button>
                            &nbsp&nbsp&nbsp&nbsp
                            <button ng-click="search()">执行</button>
                        </td>
                    </tr>
                </table>
            </div>

            <div class="col-sm-4 col-md-4" style="margin: 30px; float: right">
                <h3 class="sub-header" style="display:inline-block">接口结果</h3>
                <br/>
                <br/>
                <div>
                    code:{{vm.result.code}}<br/><br/>
                    data:{{vm.result.data}}<br/><br/>
                    msg:{{vm.result.msg}}<br/><br/>
                    traceID:{{vm.result.traceID}}<br/><br/>
                    ms:{{vm.p.ms}}ms<br/><br/>
                    success:{{vm.result.success}}<br/><br/>
                </div>
            </div>
        </div>

    </div>
</div>
